package model;

public class HeightMessageEditor {
	
	public static Height getHeight(String message){
		int i = 0;
		//System.out.println(message.length());
		while(message.charAt(i) != '-'){
			//System.out.println(i);
			i++;
		}
		int feet = Integer.parseInt(message.substring(0, i));
		int inches = Integer.parseInt(message.substring(i+1, message.length()));
		return new Height(feet, inches);
	}
	
	public static String getMessage(Height height){
		return "" + height.getFeet() + "-" + height.getInches();
	}
	
}

